
.SILENT:

.SUFFIXES: .asm .o
LD=ld
LDOPTS=-T link.ld -o

CC=gcc
CCOPTS=-g -Wall -Wextra -pedantic -c -fno-stack-protector -fno-builtin -o

ASM=nasm
ASMOPTS=-f aout -o

	TARGET=	kernel.bin

	OBJS= kstart.o libasm.o libc.o kernel.o

	INCLUDE=

all: $(OBJS)
	$(LD) $(LDOPTS) $(TARGET) $(OBJS)
clean:
	@-rm -v -f $(OBJS)
	@-rm -v -f $(TARGET)
	rm *~
	
.c.o:
	$(CC) $(CCOPTS) $@ $(INCLUDE) $<
.asm.o: 
	$(ASM) $(ASMOPTS) $@ $<
